package org.example.entity;


import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.Objects;


@ApiModel("登录信息")
public class LoginInfo implements Serializable {


    @ApiModelProperty(value = "用户名", required = true)
    private String username;
    @ApiModelProperty(value = "密码", required = true)
    private String password;


    public LoginInfo() {
    }

    public LoginInfo(String username, String password) {
        this.username = username;
        this.password = password;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || this.getClass() != o.getClass()) {
            return false;
        }
        LoginInfo loginInfo = (LoginInfo) o;
        return Objects.equals(this.username, loginInfo.username) && Objects.equals(this.password, loginInfo.password);
    }

    @Override
    public String toString() {
        return "LoginInfo{" +
                "username='" + this.username + '\'' +
                ", password='" + this.password + '\'' +
                '}';
    }

    @Override
    public int hashCode() {
        return Objects.hash(this.username, this.password);
    }

    public String getUsername() {
        return this.username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return this.password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

}

